home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / man / cmds.fmt / rpn.man < prev    next >
Encoding:
Text File  |  1989-07-26  |  6.3 KB  |  333 lines

  1.  
  2.  
  3.  
  4. RPN                       User Commands                       RPN
  5.  
  6.  
  7.  
  8. _________________________________________________________________
  9.  
  10. NNAAMMEE
  11.      rpn - reverse polish notation visual desk calculator
  12.  
  13. SSYYNNOOPPSSIISS
  14.      rrppnn
  15.  
  16. _________________________________________________________________
  17.  
  18.  
  19. DDEESSCCRRIIPPTTIIOONN
  20.      RRppnn is a stack-based desk calculator with a  screen-oriented
  21.      front  end.   This  calculator  is  very  similar,  in  many
  22.      respects, to  old  Hewlett-Packard  scientific  calculators.
  23.      The  available  commands  are listed in a menu at the top of
  24.      the screen.  the first few elements of its computation stack
  25.      are  listed  next.   At  the  bottom of the screen is a data
  26.      entry  area.   RRppnn  uses  ``reverse  polish  notation'',  or
  27.      stack-oriented commands.  Thus the basic syntax is
  28.  
  29.           _a_r_g _a_r_g _o_p
  30.           For example: 47 358 +
  31.  
  32.      This command pushes two values on the stack  (47  and  358),
  33.      then   applies  the  operation  (+)  to  those  two  values.
  34.      Operands are popped from  the  stack  and  replaced  by  the
  35.      result of the operation.  Items can be pushed onto the stack
  36.      one at a  time,  or  more  complicated  expressions  can  be
  37.      entered all on one line:
  38.  
  39.           For example: 47 179 2 * +
  40.           or: 47 179 * 2 +
  41.  
  42.      Note that the previous two examples are different  and  pro-
  43.      duce different answers.
  44.  
  45. AARRIITTHHMMEETTIICC OOPPEERRAATTIIOONNSS
  46.      +          Addition
  47.  
  48.      -          Subtraction
  49.  
  50.      *          Multiplication
  51.  
  52.      /          Division
  53.  
  54.      mod        Modulo
  55.  
  56.      **         Exponentiation
  57.  
  58.      +-         Negation
  59.  
  60.      1/x        Inverse
  61.  
  62.  
  63.  
  64.  
  65. Sprite v.1.0         Printed:  July 25, 1989                    1
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72. RPN                       User Commands                       RPN
  73.  
  74.  
  75.  
  76.      min        Minimum of two arguments
  77.  
  78.      max        Maximum of two arguments
  79.  
  80.      abs        Absolute value
  81.  
  82.      maxuint    Generates the maximum unsigned integer
  83.  
  84.      maxint     Generates the maximum signed integer
  85.  
  86. LLOOGGIICCAALL OOPPEERRAATTIIOONNSS
  87.      and (&)
  88.  
  89.      or (|)
  90.  
  91.      xor (^)
  92.  
  93.      not (~)
  94.  
  95.      shr (>>)   Shift right
  96.  
  97.      shl (<<)   Shift left
  98.  
  99. SSTTAACCKK OOPPEERRAATTIIOONNSS
  100.      xy         Swap top two stack elements
  101.  
  102.      copy       Pushes a copy of the top of stack
  103.  
  104.      clrx       Clear x, the top of the stack
  105.  
  106.      y          Clear y, the next to top of the stack
  107.  
  108.      clrs       Clear the whole stack
  109.  
  110.      clrm _N     Clear register number N
  111.  
  112.      sto _N      Store to register number N
  113.  
  114.      sto+ _N     Add to register number N
  115.  
  116.      sto- _N     Subtract from register number N
  117.  
  118.      rcl _N      Recall register number N to top of stack
  119.  
  120.      disp _D     Display D places before decimal point.  Rpn  uses
  121.                 exponential notation if a number can't be display
  122.                 in this field width.
  123.  
  124.      oct        Display stack in octal
  125.  
  126.      nooct      Remove octal stack display
  127.  
  128.  
  129.  
  130.  
  131. Sprite v.1.0         Printed:  July 25, 1989                    2
  132.  
  133.  
  134.  
  135.  
  136.  
  137.  
  138. RPN                       User Commands                       RPN
  139.  
  140.  
  141.  
  142.      hex        Display stack in hexadecimal
  143.  
  144.      nohex      Remove hexadecimal stack display
  145.  
  146.      signed     (unknown function)
  147.  
  148.      unsigned   (unknown function)
  149.  
  150.      deg        Degree mode
  151.  
  152.      rad        Radian mode
  153.  
  154. TTRRIIGG FFUUNNCCTTIIOONNSS
  155.      sin        Sine
  156.  
  157.      cos        Cosine
  158.  
  159.      tan        Tangent
  160.  
  161.      sinh       Hyperbolic sine
  162.  
  163.      cosh       Hyperbolic cosine
  164.  
  165.      tanh       Hyperbolic tangent
  166.  
  167.      asin       Arcsine
  168.  
  169.      acos       Arccosine
  170.  
  171.      atan       Arctangent
  172.  
  173.      asnh       Arc-hyperbolic sine
  174.  
  175.      acnh       Arc-hyperbolic cosine
  176.  
  177.      atnh       Arc-hyperbolic tangent
  178.  
  179.      pi         Generate the constant pi
  180.  
  181. LLOOGGAARRIITTHHMMIICC FFUUNNCCTTIIOONNSS
  182.      ln         Natural log
  183.  
  184.      log        Base-10 log
  185.  
  186.      lg2        Base-2 log
  187.  
  188.      exp        Exponential
  189.  
  190.      alog       Base-10 exponential
  191.  
  192.      alg2       Base-2 exponential
  193.  
  194.  
  195.  
  196.  
  197. Sprite v.1.0         Printed:  July 25, 1989                    3
  198.  
  199.  
  200.  
  201.  
  202.  
  203.  
  204. RPN                       User Commands                       RPN
  205.  
  206.  
  207.  
  208. SSTTAATTIISSTTIICCAALL FFUUNNCCTTIIOONNSS
  209.      s+         Statistical accumulation.  This accumulates  sta-
  210.                 tistical  data  on  two  variables, X and Y, into
  211.                 numbered registers.  The functions  var,  sd  and
  212.                 rms  use  this  data.  Given a series of n corre-
  213.                 lated X and Y pairs, enter each pair in the x and
  214.                 y registers, and execute s+.  The data is accumu-
  215.                 lated as follows:
  216.  
  217.                 sto 10         n
  218.                 sto 9          sum XY
  219.                 sto 8          sum Y**2
  220.                 sto 7          sum Y
  221.                 sto 6          sum X**2
  222.                 sto 5          sum X
  223.  
  224.      s-         This is the inverse of s+ and is used  to  remove
  225.                 incorrectly entered X-Y pairs.
  226.  
  227.      var        The variance of X and Y is computed in  registers
  228.                 x and y, and also in registers 3 and 4.
  229.  
  230.      sd         Standard deviation of X  and  Y  is  computed  in
  231.                 registers x and y, and also in registers 3 and 4.
  232.  
  233.      rms        Root-mean squared of  X  and  Y  is  computed  in
  234.                 registers x and y, and also in registers 3 and 4.
  235.  
  236. MMIISSCCEELLLLAANNEEOOUUSS FFUUNNCCTTIIOONNSS
  237.      sqrt       Square root
  238.  
  239.      gcdv       Greatest common divisor
  240.  
  241.      comb       Combinatorial ??
  242.  
  243.      fact       Factorial
  244.  
  245.      lrgn       Lagrange ??
  246.  
  247.      trun       Truncate
  248.  
  249.      roun       Round
  250.  
  251.      rand       Generate a random number
  252.  
  253. CCOONNVVEERRSSIIOONN FFUUNNCCTTIIOONNSS
  254.      d-r        Degrees to radians
  255.  
  256.      r-d        Radians to degrees
  257.  
  258.      r-p        Rectangular to polar (two dimensions)
  259.  
  260.  
  261.  
  262.  
  263. Sprite v.1.0         Printed:  July 25, 1989                    4
  264.  
  265.  
  266.  
  267.  
  268.  
  269.  
  270. RPN                       User Commands                       RPN
  271.  
  272.  
  273.  
  274.      p-r        Polar to rectangular
  275.  
  276.      r-s        Rectangular to spherical (three dimensions)
  277.  
  278.      s-r        Spherical to rectangular
  279.  
  280. KKEEYYWWOORRDDSS
  281.      calculator, stack, reverse polish notation
  282.  
  283.  
  284.  
  285.  
  286.  
  287.  
  288.  
  289.  
  290.  
  291.  
  292.  
  293.  
  294.  
  295.  
  296.  
  297.  
  298.  
  299.  
  300.  
  301.  
  302.  
  303.  
  304.  
  305.  
  306.  
  307.  
  308.  
  309.  
  310.  
  311.  
  312.  
  313.  
  314.  
  315.  
  316.  
  317.  
  318.  
  319.  
  320.  
  321.  
  322.  
  323.  
  324.  
  325.  
  326.  
  327.  
  328.  
  329. Sprite v.1.0         Printed:  July 25, 1989                    5
  330.  
  331.  
  332.  
  333.